//
//  UIBarButtonItem-Extension.swift
//  JGWB
//
//  Created by 付建国 on 2016/10/9.
//  Copyright © 2016年 sher. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    
    convenience init(imageName : String) {
        self.init()
        
        let btn = UIButton()
        btn.setImage(UIImage.init(named: imageName), for: .normal)
        btn.setImage(UIImage.init(named: imageName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        
        self.customView = btn
    }
    
    
}
